<?php


namespace app\tool\controller;


use support\Request;

class ArrayController
{
    /**
     * 获取不同
     *
     * @param Request $request
     * @return \support\Response
     */
    public function getArrayDiffData(Request $request)
    {
        $array1 = $request->post('array1');
        $array2 = $request->post('array2');
        $diff1 = array_diff($array1, $array2);
        $diff2 = array_diff($array2, $array1);
        $array_merge = array_merge($diff1,$diff2);
        return json($array_merge);
    }
}